package tom.happycat.controller;

import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


//2.定义controller 声明bean
//2.1使用@controller定义bean
@Component
public class UserController {
//    2.2设置当前操作的访问路径

    @RequestMapping("/save")
//2.3设置当前当前操作的返回值类型
    @ResponseBody
    public String save(){
        System.out.println("user save...");
        return "{'module':'springmvc'}";
    }
}

//3.加载bean，做springmvc的配置
